
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type MemberRightRequest struct {

	RightType string `json:"right_type" form:"right_type"`

	Title string `json:"title" form:"title"`

	ShowTitle string `json:"show_title" form:"show_title"`

	Image string `json:"image" form:"image"`

	Explain string `json:"explain" form:"explain"`

	Number string `json:"number" form:"number"`

	Sort string `json:"sort" form:"sort"`

	Status string `json:"status" form:"status"`

	AddTime string `json:"add_time" form:"add_time"`

}

func (r *MemberRightRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *MemberRightRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"right_type": "required",

		"title": "required",

		"show_title": "required",

		"image": "required",

		"explain": "required",

		"number": "required",

		"sort": "required",

		"status": "required",

		"add_time": "required",

	}
}

func (r *MemberRightRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *MemberRightRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *MemberRightRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
